package cn.edu.just.firstjavaapp.l16;


import java.io.*;
import java.util.Scanner;

class AccessFileRead{
	public static void main(String args[])throws IOException{
		Scanner scanner = new Scanner(System.in);
		
		int index;// = Integer.parseInt(inputString);
                index = scanner.nextInt();
		RandomAccessFile input = null;
		try{
			input = new RandomAccessFile( "c:/java/AccessDataFile.dat", "r" );
			input.seek((index-1)*4);
			int result = input.readInt();
			System.out.printf("result:%d",result);
		}catch(IOException e){
			e.printStackTrace();
		}finally{
			input.close();
		}
		
		
	}
}